import { message } from 'antd'
import axios from 'axios'
import React, { useState, useEffect } from 'react'
import './index.css'
export default function Idea() {
    const [idea, setidea] = useState('')
    const uIdea = document.getElementById('idea')
    const sendIdea = () => {
        const ideaVal = uIdea.text
        if (ideaVal) {
            message.warning('不能提交空的反馈意见哦！！！')
        } else {
            message.success('提价成功！！！')
            setidea(ideaVal)
        }
    }
    const delIdea = () => {
        uIdea.value = idea
    }
    return (
        <div>
            <h3 className="tt">意见反馈</h3>
            <div className="ideaText">
                <textarea name="idea" id="idea" cols="30" rows="10" placeholder='请输入您的意见我们将期待与您共同成长'></textarea>
            </div>
            <div className="ideaBtn">
                <button onClick={delIdea} className='del'>取消</button><button onClick={sendIdea}>提交</button>
            </div>
        </div>
    )
}
